﻿using System;
using EasyStep.Attributes;using EasyStep.TestExecution.Data;using EasyStep.TestExecution.Interfaces;

using OpenQA.Selenium;

namespace EasyStep.TestActions.Actions.Click
{
    [TestAction(typeof(Click), Name = "ByCss", RequireData = false)]
    class ClickByCss : ITestAction<IWebDriver>
    {   
        public void Execute(IWebDriver browser, TestStepResult data, IExecuteDataContext context)
        {
            browser.FindElement(By.CssSelector(data.Locator)).Click();
        }
    }
}
